package com.srcbox.file.util

import android.app.Activity
import android.content.Context
import android.view.View
import android.widget.TextView
import com.gyf.immersionbar.ImmersionBar
import com.srcbox.file.R

class GlobalMethods(private val activity: Activity) {
    /*fun initActivityUi(): GlobalMethods {

        *//*   EggUtil.alterStateBarColor(activity, "#ffffff")
           EggUtil.statusBarLightMode(activity)*//*

//        if (RomUtils.getLightStatausBarAvailableRomType() != RomUtils.AvailableRomType.NA) {


//        EggUtil.alterStateBarColor(activity, "#ffffff")
      *//*  LightStatusBarUtils.setLightStatusBar(activity, true)
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
            activity.window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
        }*//*

        *//*val systemBarTintManager = SystemBarTintManager(activity)
        systemBarTintManager.isStatusBarTintEnabled = true
        systemBarTintManager.setNavigationBarTintEnabled(true)
        systemBarTintManager.setTintColor(Color.parseColor("#2196f3"))*//*
        return this
    }*/


    fun initIcon(vararg views: View): GlobalMethods {
        views.forEach {
            it as TextView
            EggUtil.loadIcon(activity, it)
        }
        return this
    }

    fun initActivityUi() {
        ImmersionBar.with(activity)!!.statusBarColor("#ffffff")
            .autoStatusBarDarkModeEnable(true, 0.2f)
            .statusBarView(R.id.statusSplitView).init()
    }
}